<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>tvs_sdk_api: tvs_media_player_adapter.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(initResizable);
/* @license-end */</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">tvs_sdk_api
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('tvs__media__player__adapter_8h_source.html','');});
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">tvs_media_player_adapter.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="tvs__media__player__adapter_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef __TVS_MEDIA_PLAYER_ADAPTER_H__</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#define __TVS_MEDIA_PLAYER_ADAPTER_H__</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;stdint.h&gt;</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;</div><div class="line"><a name="l00016"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a218adff2f290ebce2708b619f9103e2a">   16</a></span>&#160;<span class="preprocessor">#define TVS_MEDIA_PLAYER_ERROR_MANNUAL           0</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;</div><div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a1d7717c7c9b9e67c23f4f7968369c802">   20</a></span>&#160;<span class="preprocessor">#define TVS_MEDIA_PLAYER_ERROR_OTHER            -1</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a9867087019c4f62eea0194df0a248eaf">   32</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="tvs__media__player__adapter_8h.html#a9867087019c4f62eea0194df0a248eaf">tvs_mediaplayer_adapter_set_source</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span>* song_url, <span class="keyword">const</span> <span class="keywordtype">char</span>* token, uint32_t offsetInSeconds);</div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a1dd54fea0aa69746845bc6132ff367a4">   42</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="tvs__media__player__adapter_8h.html#a1dd54fea0aa69746845bc6132ff367a4">tvs_mediaplayer_adapter_start_play</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#aeff4493ad02ff9366ed821122b6b588b">   53</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="tvs__media__player__adapter_8h.html#aeff4493ad02ff9366ed821122b6b588b">tvs_mediaplayer_adapter_stop_play</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a9b66feb55fe6e4b77791adfb7b7cee0a">   64</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="tvs__media__player__adapter_8h.html#a9b66feb55fe6e4b77791adfb7b7cee0a">tvs_mediaplayer_adapter_resume_play</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#af6884e0117cd98dce6be3882426f9cc7">   75</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="tvs__media__player__adapter_8h.html#af6884e0117cd98dce6be3882426f9cc7">tvs_mediaplayer_adapter_pause_play</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a52e20f052ba7d319e1fe54e32d14453d">   83</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="tvs__media__player__adapter_8h.html#a52e20f052ba7d319e1fe54e32d14453d">tvs_mediaplayer_adapter_get_offset</a>)(<span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a9f3836b704c2f35f72e4f2d566f40040">   91</a></span>&#160;<span class="keyword">typedef</span> bool (*<a class="code" href="tvs__media__player__adapter_8h.html#a9f3836b704c2f35f72e4f2d566f40040">tvs_mediaplayer_adapter_is_player_valid</a>)();</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a8ed5847f9a32d638e973e2edb8519d52">   99</a></span>&#160;<span class="keyword">typedef</span> bool (*<a class="code" href="tvs__media__player__adapter_8h.html#a8ed5847f9a32d638e973e2edb8519d52">tvs_mediaplayer_adapter_play_tts_inner</a>)();</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a2baac3e9cf50ea7d23b1fd68b0c516ef">  107</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="tvs__media__player__adapter_8h.html#a2baac3e9cf50ea7d23b1fd68b0c516ef">tvs_mediaplayer_adapter_tts_start</a>)(<span class="keywordtype">int</span> type);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div><div class="line"><a name="l00116"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a04a6dcef3139375e1673539daff34bb3">  116</a></span>&#160;<span class="keyword">typedef</span> void (*<a class="code" href="tvs__media__player__adapter_8h.html#a04a6dcef3139375e1673539daff34bb3">tvs_mediaplayer_adapter_tts_end</a>)(<span class="keywordtype">bool</span> force_stop);</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="tvs__media__player__adapter_8h.html#a5425eb4485baffbc77bd7195ca5354af">  125</a></span>&#160;<span class="keyword">typedef</span> int (*<a class="code" href="tvs__media__player__adapter_8h.html#a5425eb4485baffbc77bd7195ca5354af">tvs_mediaplayer_adapter_tts_data</a>)(<span class="keywordtype">char</span>* data, <span class="keywordtype">int</span> data_len);</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="structtvs__mediaplayer__adapter.html">  128</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a9867087019c4f62eea0194df0a248eaf">tvs_mediaplayer_adapter_set_source</a> set_source;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a1dd54fea0aa69746845bc6132ff367a4">tvs_mediaplayer_adapter_start_play</a> start_play;</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#aeff4493ad02ff9366ed821122b6b588b">tvs_mediaplayer_adapter_stop_play</a> stop_play;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a9b66feb55fe6e4b77791adfb7b7cee0a">tvs_mediaplayer_adapter_resume_play</a> resume_play;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#af6884e0117cd98dce6be3882426f9cc7">tvs_mediaplayer_adapter_pause_play</a> pause_play;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a52e20f052ba7d319e1fe54e32d14453d">tvs_mediaplayer_adapter_get_offset</a> get_offset;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a9f3836b704c2f35f72e4f2d566f40040">tvs_mediaplayer_adapter_is_player_valid</a> is_player_valid;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a8ed5847f9a32d638e973e2edb8519d52">tvs_mediaplayer_adapter_play_tts_inner</a> play_inner;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a2baac3e9cf50ea7d23b1fd68b0c516ef">tvs_mediaplayer_adapter_tts_start</a> tts_start;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a04a6dcef3139375e1673539daff34bb3">tvs_mediaplayer_adapter_tts_end</a> tts_end;</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    <a class="code" href="tvs__media__player__adapter_8h.html#a5425eb4485baffbc77bd7195ca5354af">tvs_mediaplayer_adapter_tts_data</a> tts_data;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;} <a class="code" href="structtvs__mediaplayer__adapter.html">tvs_mediaplayer_adapter</a>;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="keywordtype">void</span> <a class="code" href="tvs__media__player__adapter_8h.html#a1f6eb9e986aab71e8b4fa06e8a407e33">tvs_mediaplayer_adapter_init</a>(<a class="code" href="structtvs__mediaplayer__adapter.html">tvs_mediaplayer_adapter</a>* adapter);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;<span class="keywordtype">void</span> <a class="code" href="tvs__media__player__adapter_8h.html#a8d0159647baaa1bf22ccd4075cfa336a">tvs_mediaplayer_adapter_on_play_finished</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;<span class="keywordtype">void</span> <a class="code" href="tvs__media__player__adapter_8h.html#a40c43675b6795f92b76bd7228e3083b5">tvs_mediaplayer_adapter_on_play_stopped</a>(<span class="keywordtype">int</span> error_code, <span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;<span class="keywordtype">void</span> <a class="code" href="tvs__media__player__adapter_8h.html#a6ad34c4377ed0dfb30c5f6167948ff43">tvs_mediaplayer_adapter_on_play_started</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="keywordtype">void</span> <a class="code" href="tvs__media__player__adapter_8h.html#abf73484e2cd8af108a51aeb70fe385ab">tvs_mediaplayer_adapter_on_play_paused</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* token);</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="preprocessor">#endif</span></div><div class="ttc" id="tvs__media__player__adapter_8h_html_abf73484e2cd8af108a51aeb70fe385ab"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#abf73484e2cd8af108a51aeb70fe385ab">tvs_mediaplayer_adapter_on_play_paused</a></div><div class="ttdeci">void tvs_mediaplayer_adapter_on_play_paused(const char *token)</div><div class="ttdoc">播放腾讯云叮当下发的网络媒体暂停的时候，调用此函数通知TVS SDK</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a5425eb4485baffbc77bd7195ca5354af"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a5425eb4485baffbc77bd7195ca5354af">tvs_mediaplayer_adapter_tts_data</a></div><div class="ttdeci">int(* tvs_mediaplayer_adapter_tts_data)(char *data, int data_len)</div><div class="ttdoc">TTS流数据下发(可选)</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:125</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_aeff4493ad02ff9366ed821122b6b588b"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#aeff4493ad02ff9366ed821122b6b588b">tvs_mediaplayer_adapter_stop_play</a></div><div class="ttdeci">int(* tvs_mediaplayer_adapter_stop_play)(const char *token)</div><div class="ttdoc">停止播放 当用户通过语音暂停/停止播放（比如通过语音输入“暂停播放”、“停止播放”等指令）， 或者在APP端暂停/停止播放之前下发的媒体的时候，SDK将会调用此接口。 实现此接口，调用平台播放器的sto...</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:53</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a8d0159647baaa1bf22ccd4075cfa336a"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a8d0159647baaa1bf22ccd4075cfa336a">tvs_mediaplayer_adapter_on_play_finished</a></div><div class="ttdeci">void tvs_mediaplayer_adapter_on_play_finished(const char *token)</div><div class="ttdoc">播放腾讯云叮当下发的网络媒体结束的时候，调用此函数通知TVS SDK</div></div>
<div class="ttc" id="structtvs__mediaplayer__adapter_html"><div class="ttname"><a href="structtvs__mediaplayer__adapter.html">tvs_mediaplayer_adapter</a></div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:128</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_af6884e0117cd98dce6be3882426f9cc7"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#af6884e0117cd98dce6be3882426f9cc7">tvs_mediaplayer_adapter_pause_play</a></div><div class="ttdeci">int(* tvs_mediaplayer_adapter_pause_play)(const char *token)</div><div class="ttdoc">暂停播放 在终端SDK进入繁忙状态（比如开始输入语音、开始媒体播控等情况下），SDK将回调此接口， 暂停当前播放的流媒体。 实现此接口，调用平台播放器的pause功能，暂停播放当前流媒体，以让出资源供S...</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:75</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a1f6eb9e986aab71e8b4fa06e8a407e33"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a1f6eb9e986aab71e8b4fa06e8a407e33">tvs_mediaplayer_adapter_init</a></div><div class="ttdeci">void tvs_mediaplayer_adapter_init(tvs_mediaplayer_adapter *adapter)</div><div class="ttdoc">初始化mediaplayer adapter</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a8ed5847f9a32d638e973e2edb8519d52"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a8ed5847f9a32d638e973e2edb8519d52">tvs_mediaplayer_adapter_play_tts_inner</a></div><div class="ttdeci">bool(* tvs_mediaplayer_adapter_play_tts_inner)()</div><div class="ttdoc">是否在SDK内部播放TTS(可选)</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:99</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a6ad34c4377ed0dfb30c5f6167948ff43"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a6ad34c4377ed0dfb30c5f6167948ff43">tvs_mediaplayer_adapter_on_play_started</a></div><div class="ttdeci">void tvs_mediaplayer_adapter_on_play_started(const char *token)</div><div class="ttdoc">播放腾讯云叮当下发的网络媒体开始播放的时候，调用此函数通知TVS SDK</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a9867087019c4f62eea0194df0a248eaf"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a9867087019c4f62eea0194df0a248eaf">tvs_mediaplayer_adapter_set_source</a></div><div class="ttdeci">int(* tvs_mediaplayer_adapter_set_source)(const char *song_url, const char *token, uint32_t offsetInSeconds)</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:32</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a40c43675b6795f92b76bd7228e3083b5"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a40c43675b6795f92b76bd7228e3083b5">tvs_mediaplayer_adapter_on_play_stopped</a></div><div class="ttdeci">void tvs_mediaplayer_adapter_on_play_stopped(int error_code, const char *token)</div><div class="ttdoc">正在播放腾讯云叮当下发的网络媒体的时候，出错或者停止时，调用此函数通知TVS SDK</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a2baac3e9cf50ea7d23b1fd68b0c516ef"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a2baac3e9cf50ea7d23b1fd68b0c516ef">tvs_mediaplayer_adapter_tts_start</a></div><div class="ttdeci">int(* tvs_mediaplayer_adapter_tts_start)(int type)</div><div class="ttdoc">TTS流开始播放，此回调函数被调用，代表SDK已经准备下发TTS数据流，此时需要准备并开启播放器，等待TTS数据写入(可选)</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:107</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a1dd54fea0aa69746845bc6132ff367a4"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a1dd54fea0aa69746845bc6132ff367a4">tvs_mediaplayer_adapter_start_play</a></div><div class="ttdeci">int(* tvs_mediaplayer_adapter_start_play)(const char *token)</div><div class="ttdoc">开始播放 当云端下发了一个新媒体后，SDK将调用此接口。 需要实现此接口，调用平台的播放器，播放之前set_source阶段下发的媒体url</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:42</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a04a6dcef3139375e1673539daff34bb3"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a04a6dcef3139375e1673539daff34bb3">tvs_mediaplayer_adapter_tts_end</a></div><div class="ttdeci">void(* tvs_mediaplayer_adapter_tts_end)(bool force_stop)</div><div class="ttdoc">TTS流结束播放(可选)</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:116</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a9b66feb55fe6e4b77791adfb7b7cee0a"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a9b66feb55fe6e4b77791adfb7b7cee0a">tvs_mediaplayer_adapter_resume_play</a></div><div class="ttdeci">int(* tvs_mediaplayer_adapter_resume_play)(const char *token)</div><div class="ttdoc">继续播放 在终端SDK从繁忙状态进入空闲状态后（比如当前一轮智能语音交互、媒体播控等工作结束），SDK将回调此接口， 继续播放之前下发的流媒体；如果之前终端并未处于播放网络流媒体的状态，则SDK不会回调...</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:64</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a9f3836b704c2f35f72e4f2d566f40040"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a9f3836b704c2f35f72e4f2d566f40040">tvs_mediaplayer_adapter_is_player_valid</a></div><div class="ttdeci">bool(* tvs_mediaplayer_adapter_is_player_valid)()</div><div class="ttdoc">media player是否有效，如果无效，新的智能语音对话无法发起</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:91</div></div>
<div class="ttc" id="tvs__media__player__adapter_8h_html_a52e20f052ba7d319e1fe54e32d14453d"><div class="ttname"><a href="tvs__media__player__adapter_8h.html#a52e20f052ba7d319e1fe54e32d14453d">tvs_mediaplayer_adapter_get_offset</a></div><div class="ttdeci">int(* tvs_mediaplayer_adapter_get_offset)(const char *token)</div><div class="ttdoc">获取当前播放的网络流媒体的已播放时间</div><div class="ttdef"><b>Definition:</b> tvs_media_player_adapter.h:83</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="tvs__media__player__adapter_8h.html">tvs_media_player_adapter.h</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
  </ul>
</div>
</body>
</html>
